modules.UserInfo = function(id, view, options){
	frameworks.modules.BaseModule.call(this, id, view, options);
	this._curUserVO = null;
	var that = this;
	view.onclick = function(e){that.itemClick();};
};
modules.UserInfo.prototype = new frameworks.modules.BaseModule();
modules.UserInfo.prototype.buildEnvironmentCompleted = function(result){
	if(result.valid){
		this._curUserVO = facade.model.getProperty("curUser");
		this._curUserVO.addWatcher(this, "user", this._watch_curUser_user);
		//this.view.innerHTML = result.data.uname;
	}else{
		this.view.innerHTML = '获取用户信息失败，重试';
	}
};
modules.UserInfo.prototype.itemClick = function(){
	this._curUserVO.setProperty("user",{uname:"李小明"});
};
modules.UserInfo.prototype._watch_curUser_user = function(init){
	this.view.innerHTML = this._curUserVO.getProperty("user").uname
	//_userInfo.uname.text = ;
	//_userInfo.con.dataProvider = ['登录',"注册"];
};
Util.CreateModule("UserInfo");
